package com.dhbw.ui.ctrl;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;

import com.dhbw.ui.model.*;

@ManagedBean
@RequestScoped
public class LoginViewController {
	
	@ManagedProperty(value="#{loginClass}")
	private LoginClass myLogin;

	public LoginClass getMyLogin() {
		return myLogin;
	}

	public void setMyLogin(LoginClass myLogin) {
		this.myLogin = myLogin;
	}

	public String checkPw() {
		if(myLogin.getName().equals("name") && myLogin.getPw().equals("pw") ){
			return "welcome";
		}
		else {
			return "failure";
		}
	}
}
